package com.beamfield.dao.sys;

import com.beamfield.model.PersonInfo;
import com.beamfield.model.PersonInfoExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.beamfield.modelVo.ProcAttendVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
@Component
public interface PersonInfoMapper {
    int countByExample(PersonInfoExample example);

    int deleteByPrimaryKey(Long id);

    int insert(PersonInfo record);

    int insertSelective(PersonInfo record);

    List<PersonInfo> selectByExample(PersonInfoExample example);

    PersonInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PersonInfo record);

    int updateByPrimaryKey(PersonInfo record);

    List<PersonInfo> selectByMinute(@Param("minute")String minute,@Param("name")String name,@Param("date")String date,@Param("beam_id")Long beamId);

    List<PersonInfo> selectAttendDates(@Param("beam_id")Long beamId);

    List<PersonInfo> selectByAttendDeviceId(
            @Param("attendDeviceIds") List<String> attendDeviceIds,
            @Param("name") String name,
            @Param("procStartTime") Date procStartTime,
            @Param("nextProcStartTime") Date nextProcStartTime);

    long countByAttendDeviceId(@Param("attendDeviceId") String attendDeviceId,
                               @Param("name") String name,
                               @Param("procStartTime") Date procStartTime,
                               @Param("nextProcStartTime") Date nextProcStartTime);
}